#card.py
class Card(dict):
  attr={"name":str,"tel":str,"age":int}
  def sayHello(self):print hello;
  def __init__(self,table={}):
    #print table
    #print self.attr
    if isinstance(table,dict):      
      for (k,v) in table.items():
        if k in self.attr and isinstance(v,self.attr[k]):      
          dict.__setitem__(self,k,v)
  
  def p(self):print dict.__repr__(self);
  
  #def __getattribute__(self,name):
   # if name in dict.__getattribute__(self,"attr"):return name